def chop(t):
    del t[0]
    del t[-1]


a = [1, 2, 3, 4, 5]
chop(a)
print(a)


def middle(t):
    return t[1:-1]


a = [1, 2, 3, 4, 5]
print(middle(a))
# a = [1, 2, 3, 4, 5]
print('a is middle(a)?', a is middle(a))  # false
